package chances.epg.api.controller.model;

import java.util.ArrayList;
import java.util.List;

import chances.epg.entity.biz.BizPosition;
import chances.epg.entity.biz.BizPositionItem;

public class PositionInfo {
	private BizPosition bizPostion;
	
	public PositionInfo(BizPosition bizPosition) {
		this.bizPostion = bizPosition;
	}
	
	public String getBizCode() {
		return this.bizPostion.getBizCode();
	}
	
	public String getName() {
		return this.bizPostion.getName();
	}
	
	public String getTitle() {
		return this.bizPostion.getTitle();
	}
	
	public String getCode() {
		return this.bizPostion.getCode();
	}
	
	public String getDisplayType() {
		return this.bizPostion.getDisplayType();
	}
	
	
	public List<PositionItemInfo> getItems() {
		List<PositionItemInfo> result = new ArrayList<PositionItemInfo>();
		for (BizPositionItem item : this.bizPostion.getItems()) {
			result.add(new PositionItemInfo(item));
		}
		
		return result;
	}
}
